A Domain-Specific Language for Scripting Refactorings in Erlang
نویسندگان
چکیده
Refactoring is the process of changing the design of a program without changing its behaviour. Many refactoring tools have been developed for various programming languages; however, their support for composite refactorings – refactorings that are composed from a number of primitive refactorings – is limited. In particular, there is a lack of powerful and easy-to-use frameworks that allow users to script their own large-scale refactorings efficiently and effectively. This paper introduces the domain-specific language framework of Wrangler – a refactoring and code inspection tool for Erlang programs – that allows users to script composite refactorings, test them and apply them on the fly. The composite refactorings are fully integrated into Wrangler and so can be previewed, applied and ‘undone’ interactively.
منابع مشابه
Improved Testing through Refactoring: Experience from the ProTest Project
We report on how the Wrangler refactoring tool has been used to improve and transform test code for Erlang systems. This has been achieved through the removal of code clones, the identification of properties for property-based testing and the definition of testing-aware refactorings and test-framework-specific refactorings. While some of the observations are Erlang-specific, others apply to tes...
متن کاملImproving your test code with Wrangler
In this paper we show how the ’similar code’ detection facilities of Wrangler, combined with its portfolio of refactorings, allow test code to be shrunk dramatically, under the guidance of the test engineer. This is illustrated by a sequence of refactorings of a test suite taken from an Erlang project at Ericsson AB.
متن کاملA User-extensible Refactoring Tool for Erlang Programs
Refactoring is the process of changing the design of a program without changing what it does. While it is possible to refactor a program by hand, tool support is considered invaluable as it allows largescale refactorings to be performed easily. However, most refactoring tools are black boxes, supporting a fixed set of ‘core’ refactorings. This paper reports the framework built into Wrangler – a...
متن کاملA Comparative Study of Refactoring Haskell and Erlang Programs
Refactoring is about changing the design of existing code without changing its behaviour, but with the aim of making code easier to understand, modify, or reuse. Taking Haskell and Erlang as examples, we investigate the application of refactoring techniques to functional programs, and building tools for supporting interactive refactoring. Although both Haskell and Erlang are general-purpose fun...
متن کاملTesting Erlang Refactorings with QuickCheck
Refactoring is a technique for improving the design of existing programs without changing their behaviour. Wrangler is a tool built at the University of Kent to support Erlang program refactoring; the Wrangler tool is written in Erlang. In this paper we present the use of a novel testing tool, Quviq QuickCheck, for testing the implementation of Wrangler. QuickCheck is a specificationbased testi...
متن کامل